package com.powernode;

import com.powernode.common.constant.JWTConstants;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DlykServiceApplication implements ApplicationRunner {

    @Value("${jwt.secret}")
    private String jwtSecret;


    public static void main(String[] args) {
        SpringApplication.run(DlykServiceApplication.class, args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        JWTConstants.JWT_SECRET = jwtSecret;
    }
}
